# #!/usr/bin/python
# # author Yu
# # 2023年03月19日
# from django.shortcuts import redirect
# from django.utils.deprecation import MiddlewareMixin
#
#
# class MyMiddleware_(MiddlewareMixin):
#     def process_request(self, request):
#         url_list = ['/', '/admin', '/register', 'index']
#         if request.path_info not in url_list:
#             info_ = request.session.get('info')
#             if not info_:
#                 return redirect('/')
#             # 可以将下面这一行注释掉，因为返回 None 是默认的行为
#             # return None
